/*
 * @(#)SimpleTriggerCriteria.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.workflow.core;

/**
 * <p>Class Name:       SimpleTriggerCriteria.java    </p>
 * <p>Description:      A sample trigger class to return true/false accord to the config.</p>
 * @author              Lun Au
 * @company             DCIVision Limited
 * @creation date       17/12/2004
 * @version             $Revision: 1.3 $
 */
public class SimpleTriggerCriteria implements WorkflowTriggerCriteria {
  
  private boolean bTrigger = false;
  
  public void init ( String config ) throws Exception {
    //bTrigger = Boolean.valueOf(config).booleanValue();
    bTrigger = true;  
  }
  
  public boolean validate() throws Exception {
    /**
     * @TODO check according to the config file
     */  
    return bTrigger;
  }
}
